package com.hxzy.projectssmplus.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hxzy.projectssmplus.dto.HouseHuxingtuDTO;
import com.hxzy.projectssmplus.entity.HouseHuxingtu;
import com.hxzy.projectssmplus.mapper.HouseHuxingtuMapper;
import com.hxzy.projectssmplus.service.HouseHuxingtuService;
import com.hxzy.projectssmplus.vo.HouseHuxingtuVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HouseHuxingtuServiceImpl extends ServiceImpl<HouseHuxingtuMapper, HouseHuxingtu> implements HouseHuxingtuService {

    @Autowired
    private HouseHuxingtuMapper houseHuxingtuMapper;

    @Override
    public IPage<HouseHuxingtuVo> searchByXML(IPage iPage, HouseHuxingtuDTO houseHuxingtuDTO) {
        List<HouseHuxingtuVo> list = this.houseHuxingtuMapper.searchByXML(iPage, houseHuxingtuDTO);
        iPage.setRecords(list);
        return iPage;
    }

    @Override
    public HouseHuxingtuVo selectOne(int id) {
        return this.houseHuxingtuMapper.selectOne(id);
    }

    @Override
    public int insert(HouseHuxingtu houseHuxingtu) {
        return this.houseHuxingtuMapper.insert(houseHuxingtu);
    }

}
